<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div><label for="查找博客标题、摘要、内容、分类、作者"></label></div>
    <div><input type="button" value="查找"  name="chazhao"></div>
    <div><input type="button" value="新增" name="xinzheng"></div>
    <div>
    <table id="taData">
        <tr>
            <th>
                Id
            </th>
            <th>
                标题
            </th>
            <th>
                摘要
            </th>
            <th>
                内容
            </th>
            <th>
                分类
            </th>
            <th>
                作者
            </th>
            <th>
                发表时间
            </th>
            <th>
                操作
             <input type="button" value="修改"  name="xiugai">   
             <input type="button" value="删除" name="shanchu">   
            </th>
        </tr>
    </table>
</div>
    <script src="./js/api.js"></script>
    <script src="/js/jquery-3.6.0.min.js"></script>
    <script>
         function updata(Id){
                location.href = './addOrEdit.html?id=' + Id;
            }
            function del(Id){
                delProductById(Id).then(data =>{
                    if (data.code === 1000) {
                        console.log(data);
                        let Id = data.data.Id;
                        $(`[key=${Id}]`).remove();
                    } else {
                        alert(data.msg);
                    }
                })
            }
            function query(){
                let keyword=$('[name=keyword]').val();
                getListWithKeyword(keyword);
            }
    </script>
</body>
</html>